<template>
    <div>
        <home-header></home-header>
        <home-swapper :list="swiperList"></home-swapper>
        <home-icon></home-icon>
        <home-event></home-event>        
        <hr/>
        <home-flex></home-flex>
    </div>
</template>


<script>
import HomeHeader from "./components/Header"
import HomeSwapper from "./components/Swapper"
import HomeIcon from "./components/Icon"
import axios from "axios"
import HomeEvent from "./components/HomeEvent"
import HomeFlex from "./components/Flex"
export default {
    name: "Home",
    components: {
        HomeHeader,
        HomeSwapper,
        HomeIcon,
        HomeEvent,
        HomeFlex
    },
    data () {
        return{
            swiperList:[],
        }
    },
    methods: {
        getHomeData(res){
            var result = res.data
            this.swiperList = result.swiperList
        } ,
    },
    mounted : function () {
        axios.get("/api/home.json").then(this.getHomeData)
    }
};
</script>

<style scoped>
</style>
